package com.pimwi.view.popup
{
  import com.pimwi.dp.GroupDP;
  import com.pimwi.vo.request.SaveGroupRequest;

  public class EditGroupPopUp extends GroupPopUp
  {
    public function EditGroupPopUp()
    {
      super();
      title = "Modifier un groupe";
    }

    protected override function applyButtonClickHandler():void
    {
      groupDP.name = nameInput.text;

      var request:SaveGroupRequest = new SaveGroupRequest();
      request.group = groupDP.group;
      request.userId = locator.userDP.id;

      locator.groupService.saveGroup(request);

      closePopUp();
    }

  }
}